<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title></title>
<link rel="stylesheet" href="/css_system/common.css" />
<link rel="stylesheet" href="/css_system/main.css" />
<link href="/js_system/jQueryUI/jquery-ui.css" rel="stylesheet">
<link rel="stylesheet" href="/js_system/easydialog/easydialog.css" />
<script type="text/javascript" src="/js_system/easydialog/easydialog.js"></script>
<script type="text/javascript" src="/js_system/cueeasy.js"></script>
<script type="text/javascript" src="/js_system/jquery.min.js"></script>
<script type="text/javascript" src="/js_system/common.js"></script>
<script type="text/javascript" src="/js_system/books.js"></script>
<!-- 表格 -->
<script type="text/javascript" src="/js_system/colResizable-1.3.min.js"></script>

<script type="text/javascript">
        $(function () {
            $(".dataTable").colResizable({
                liveDrag: true,
                gripInnerHtml: "<div class='grip'></div>",
                draggingClass: "dragging",
                minWidth: 30
            });
        });
    </script>
</head>
    <body>
  <div class="container">
		<div class="location clearfix">
			<div class="here_area fl">
				<strong>当前位置：</strong>书籍管理&nbsp;&nbsp;&raquo;&nbsp;&nbsp;书籍列表
			</div>
			<div class="here_btn fr">
				<a href="/admin_system/books/edit" class="btn btn_add">添加</a>
				<input type="button" id="DelButton" name="DelButton" class="btn btn_del" value="删 除" onclick="DelDialog('确认要删除选中的书籍吗？',2)" />
				 <input type="button" name="button" class="btn btn_refresh" value="刷新" onclick="location.replace(location.href);" />
			</div>
		</div>


		<form action="?" method="get">
			<dl class="filter clearfix">
				<dt>查询关键词：</dt>
				
				<dd>
					<input type="text" value="{{$paras['keyword']}}" onkeydown="if(event.keyCode==13){document.getElementById('SearchBtn').click();return false;}" class="input-text" id="KeyWords" name="KeyWords">
				</dd>
				
				<dd>
					<select name="isFree" class="select">
						<option value="2">全部</option>
						<option value="0" @if($paras['isFree'] == 0) selected @endif>收费</option>
						<option value="1" @if($paras['isFree'] == 1) selected @endif>免费</option>
					</select>
				</dd>

				
				<dd>
					<select name="type" class="select">
						<option value="0">全部</option>
						@foreach($bookTypes as $type)
							@if($type->TypeID == $paras['type'])
								<option value="{{$type->TypeID}}" selected>{{$type->TypeName}}</option>
							@else
								<option value="{{$type->TypeID}}">{{$type->TypeName}}</option>
							@endif
						@endforeach
					</select>
				</dd>
				<dd>
					<input type="submit" class="button button-primary" id="SearchBtn" value="搜 索">
				</dd>
			</dl>	
		</form>
		




		<table class="dataTable">
			<thead>
				<tr>
					<th style="width: 40px;">选择 </th>
					<th class="text-left">书籍标题</th>
					<th  >分类名称</th>
					<th style="width:80px;">播放次数</th>
					<th  style="width: 50px;">显示</th>
					<th>免费</th>
					<th style="width:100px;">发布日期</th>
					<th  style="width: 150px;">修改时间</th>
				 	<th style="width: 50px;">操作</th> 	

				</tr>
			</thead>
			<tbody>
				@foreach($BookInfo as $data)
                    <tr>
                    <td><input type="checkbox"  name="cbxid" value="{{$data->BookID}}" id="cbxid_{{$data->BookID}}"></td>
                    <td class="text-left">{{$data->BookTitle}}</td>
                    <td>{{$data->TypeName}}</td>
					<td>{{$data->ReadNumber}}</td>
                    <td>@if($data->IsShow==1)<i class="visibleImg"></i>@else<i class="invisibleImg"></i>@endif</td>
                    <td>@if($data->IsGratis==1)<i class="visibleImg"></i>@else<i class="invisibleImg"></i>@endif</td>
					<td>{{$data->publish_date}}</td>
                    <td>{{$data->ReleaseDate}}</td>
                     <td><a class="editBtn" href="/admin_system/books/edit?bookId={{$data->BookID}}"></a></td>
                    </tr>
                   @endforeach
			</tbody>
		</table>
		<div class="pagectrl clearfix">
			{!! $BookInfo->appends($paras)->links() !!}
		</div>
	</div>
    </body>
</html>